﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:avalon="http://schemas.xceed.com/wpf/xaml/avalondock"
        xmlns:conv="clr-namespace:automerge.Converters"    
    
        x:Class="automerge.MainWindow"
        Title="autoMerge" Height="350" Width="525">
    <Window.Resources>
        <conv:ActiveDocumentConverter x:Key="ActiveDocumentConverter"/>
    </Window.Resources>
    <Border BorderThickness="5px" CornerRadius="3" BorderBrush="Brown" >
        <Grid>

            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Menu>
                <MenuItem Header="Файл">
                    <MenuItem Header="Открыть оригинал" Command="{Binding OpenCommand}"/>
                    <Separator/>
                    <MenuItem Header="Открыть версию программиста А" Command="{Binding ActiveDocument.SaveCommand}"/>
                    <MenuItem Header="Открыть версию программиста В" Command="{Binding ActiveDocument.SaveAsCommand}"/>
                    <Separator/>
                    <MenuItem Header="Выход" Command="{Binding ActiveDocument.CloseCommand}"/>
                </MenuItem>
                <MenuItem Header="Инстументы">
                    <MenuItem Header="Слияние" IsChecked="{Binding FileStats.IsVisible, Mode=TwoWay}" IsCheckable="True"/>
                    <MenuItem Header="Сохранить результат слияния..." IsChecked="{Binding FileStats.IsVisible, Mode=TwoWay}" IsCheckable="True"/>
                </MenuItem>
                <MenuItem Header="Справка">
                    <MenuItem Header="Что делает приложение" IsChecked="{Binding FileStats.IsVisible, Mode=TwoWay}" IsCheckable="True"/>

                </MenuItem>


            </Menu>

            <avalon:DockingManager x:Name="dockManager"   Grid.Row="1" 
                                   AnchorablesSource="{Binding Tools}" 
                                   DocumentsSource="{Binding Files}"
                                   ActiveContent="{Binding ActiveDocument, Mode=TwoWay, Converter={StaticResource ActiveDocumentConverter}}"
                                   
                                   
                                   >

            </avalon:DockingManager>
            <StatusBar Grid.Row="2" Height="30px" >
                <ProgressBar Width="492" Height="20px" Value="50" />
            </StatusBar>

        </Grid>
    </Border>
</Window>
